from django.db import models
from datetime import datetime


# Create your models here.
class Sign(models.Model):
    wx_id = models.CharField(max_length=32)
    sign_time = models.DateTimeField()

    def __str__(self):
        return str(self.sign_time)


class Name(models.Model):
    wx_id = models.CharField(max_length=32)
    name = models.TextField(max_length=32)

    def __str__(self):
        return self.name


class Picture(models.Model):
    wx_id = models.CharField(max_length=32)
    pic_url = models.CharField(max_length=256)
    media_id = models.CharField(max_length=128)
    insert_time = models.DateTimeField(default=datetime.now)

    def __str__(self):
        return self.media_id
